package controllers;

import java.io.Serializable;
import java.sql.Date;

import model.GeneralMessage;

public class InboxController implements Serializable {
	
	private GeneralMessage[] emails = new GeneralMessage[]{
			
			new GeneralMessage(1, 1, "salut ce faci", new Date(0), "delete_resource", 1),
			new GeneralMessage(2, 1, "salut ce faci 2", new Date(0), "delete_resource", 2),
			new GeneralMessage(3, 1, "salut ce faci 4", new Date(0), "delete_resource", 3),			
			
	};
	
	private int currentID;
	private String currentContent;
	
	public InboxController(){
		
	}

	public GeneralMessage[] getEmails() {

		return emails;
	}

	public void setEmails(GeneralMessage[] emails) {

		this.emails = emails;
	}

	public int getCurrentID() {

		return currentID;
	}

	public void setCurrentID(int currentID) {

		this.currentID = currentID;
	}
	
	public void verificaID(int id){
		
		this.currentID = id;
		
		this.setCurrentContent(emails[id-1].getContent());
		
		System.out.println(id);
		
	}

	public String getCurrentContent() {

		return currentContent;
	}

	public void setCurrentContent(String currentContent) {

		this.currentContent = currentContent;
	}
	
	

}
